#!/bin/bash

# 修复 configmanager.h 引用
find include/ sdk/ src/ -name "*.cpp" -o -name "*.h" | xargs sed -i 's|#include "configmanager.h"|#include <configmanager.h>|g'
find include/ sdk/ src/ -name "*.cpp" -o -name "*.h" | xargs sed -i 's|#include <configmanager.h>|#include "../../plugins/configmanager_common/include/configmanager.h"|g'

# 修复 configurationpanel.h 引用
find include/ sdk/ src/ -name "*.cpp" -o -name "*.h" | xargs sed -i 's|#include "configurationpanel.h"|#include <configurationpanel.h>|g'
find include/ sdk/ src/ -name "*.cpp" -o -name "*.h" | xargs sed -i 's|#include <configurationpanel.h>|#include "../../plugins/configmanager_common/include/configurationpanel.h"|g'

# 修复 importers_globals.h 引用（如果存在）
find include/ sdk/ src/ -name "*.cpp" -o -name "*.h" | xargs sed -i 's|#include "importers_globals.h"|#include "../../plugins/configmanager_importers/include/importers_globals.h"|g'

echo "包含路径修复完成"
